<style tyle="text/css">
  .quick-btn {
    padding-top: 8px;
	color: #428bca;
  }
	.red {
		color: #f00
	}
</style>
<div class="col-lg-12 mt20">
  <div class="panel">
    <div class="panel-body">
      <div class="col-sm-12">
        <div class="row mt10">
            <div class="col-lg-2-4">
              <div class="input-group" ng-click="dateOpen($event, date)">
                <input type="text" class="form-control" datepicker-popup="yyyy-MM-dd" ng-model="date.lable" 
                is-open="date.opened" placeholder="支付开始时间" ng-required="true" 
                close-text="关闭" current-text="今天" clear-text="清除" readonly/>
                <span class="input-group-btn">
                  <button type="button" class="btn btn-default">
                    <i class="glyphicon glyphicon-calendar"></i>
                  </button>
                </span>
              </div>
            </div>
            <div class="col-lg-2-4">
              <div class="input-group" ng-click="dateOpen($event, date1)">
                <input type="text" class="form-control" datepicker-popup="yyyy-MM-dd" ng-model="date1.lable" 
                is-open="date1.opened" placeholder="支付截止时间" ng-required="true" 
                close-text="关闭" current-text="今天" clear-text="清除"  readonly/>
                <span class="input-group-btn">
                  <button type="button" class="btn btn-default">
                    <i class="glyphicon glyphicon-calendar"></i>
                  </button>
                </span>
              </div>
            </div>
            <div class="col-sm-3">
              <a class="btn btn-xs btn-link quick-btn" ng-click="today()">今天</a>
              <a class="btn btn-xs btn-link quick-btn" ng-click="yesterday()">昨天</a>
              <a class="btn btn-xs btn-link quick-btn" ng-click="thisWeek()">本周</a>
              <a class="btn btn-xs btn-link quick-btn" ng-click="lastWeek()">上周</a>
              <a class="btn btn-xs btn-link quick-btn" ng-click="thisMonth()">本月</a>
              <a class="btn btn-xs btn-link quick-btn" ng-click="lastMonth()">上月</a>
            </div>
          </div>
      </div>
      <div class="col-sm-12">
        <div class="row mt10">
          <div class="col-lg-2-4">
              <div class="input-group" ng-click="dateOpen($event, date2)">
                    <input type="text" class="form-control" datepicker-popup="yyyy-MM-dd" ng-model="date2.lable" 
                    is-open="date2.opened" placeholder="购买开始时间" ng-required="true" 
                    close-text="关闭" current-text="今天" clear-text="清除" readonly/>
                    <span class="input-group-btn">
                      <button type="button" class="btn btn-default">
                        <i class="glyphicon glyphicon-calendar"></i>
                      </button>
                    </span>
              </div>
          </div>
          <div class="col-lg-2-4">
            <div class="input-group" ng-click="dateOpen($event, date3)">
              <input type="text" class="form-control" datepicker-popup="yyyy-MM-dd" ng-model="date3.lable" 
              is-open="date3.opened" placeholder="购买截止时间" ng-required="true" 
              close-text="关闭" current-text="今天" clear-text="清除"  readonly/>
              <span class="input-group-btn">
                <button type="button" class="btn btn-default">
                  <i class="glyphicon glyphicon-calendar"></i>
                </button>
              </span>
            </div>
          </div>
          <div class="col-sm-3">
            <a class="btn btn-xs btn-link quick-btn" ng-click="todayPay()">今天</a>
            <a class="btn btn-xs btn-link quick-btn" ng-click="yesterdayPay()">昨天</a>
            <a class="btn btn-xs btn-link quick-btn" ng-click="thisWeekPay()">本周</a>
            <a class="btn btn-xs btn-link quick-btn" ng-click="lastWeekPay()">上周</a>
            <a class="btn btn-xs btn-link quick-btn" ng-click="thisMonthPay()">本月</a>
            <a class="btn btn-xs btn-link quick-btn" ng-click="lastMonthPay()">上月</a>
          </div>
          <div class="col-sm-2">
              <input type="text" class="form-control" ng-keyup="myKeyup($event)" ng-model="searchform.code" placeholder="购物车编号">
          </div>
          <div class="col-lg-1 text-left">
            <a class="btn btn-xs btn-link under-line" style="color: #428bca; vertical-align:-webkit-baseline-middle" 
             ng-click="moreSearch()">更多搜索 
            <i class="fa fa-caret-down" ng-show="!searchform.moreSearch"></i>
            <i class="fa fa-caret-up" ng-show="searchform.moreSearch"></i>
            </a>
          </div>
          <div class="col-sm-1">
              <button class="btn btn-block btn-info" ng-click="load()">搜索</button>
          </div>
          <div ng-show="searchform.moreSearch">
            <div class="row col-lg-12 mt10">
              <div class="col-sm-2">
                <ui-select ng-model="searchform.payState" theme="bootstrap" ng-keyup="myKeyup($event)">
                  <ui-select-match placeholder="支付状态">
                      {{$select.selected.label}}
                  </ui-select-match>
                  <ui-select-choices repeat="item.value as item in pstate | filter: $select.search">
                      <span ng-bind-html="item.label | highlight: $select.search"></span>
                  </ui-select-choices>
                </ui-select>
              </div>
              <div class="col-sm-2">
                <ui-select ng-model="searchform.payType" theme="bootstrap" ng-keyup="myKeyup($event)">
                  <ui-select-match placeholder="支付类型">
                      {{$select.selected.label}}
                  </ui-select-match>
                  <ui-select-choices repeat="item.value as item in ptype | filter: $select.search">
                      <span ng-bind-html="item.label | highlight: $select.search"></span>
                  </ui-select-choices>
                </ui-select>
              </div>
              <div class="col-sm-2">
                <ui-select ng-model="searchform.payFeeType" theme="bootstrap" ng-keyup="myKeyup($event)">
                  <ui-select-match placeholder="支付成功类型">
                      {{$select.selected.label}}
                  </ui-select-match>
                  <ui-select-choices repeat="item.value as item in pstype | filter: $select.search">
                      <span ng-bind-html="item.label | highlight: $select.search"></span>
                  </ui-select-choices>
                </ui-select>
              </div>
              <div class="col-sm-2">
                <ui-select ng-model="searchform.cancelState" theme="bootstrap" ng-keyup="myKeyup($event)">
                  <ui-select-match placeholder="订单状态">
                      {{$select.selected.label}}
                  </ui-select-match>
                  <ui-select-choices repeat="item.value as item in ostate | filter: $select.search">
                      <span ng-bind-html="item.label | highlight: $select.search"></span>
                  </ui-select-choices>
                </ui-select>
              </div>
              <div class="col-sm-2">
                  <input type="text" class="form-control" ng-keyup="myKeyup($event)" ng-model="searchform.createBy" placeholder="下单人">
              </div>
              <div class="col-sm-2">
                  <input type="text" class="form-control" ng-keyup="myKeyup($event)" ng-model="searchform.deviceCode" placeholder="设备号">
              </div>
            </div>
          </div>
        </div>
      </div>
		</div>

      </div> 
    </div>
  </div>
	<!-- searchArea -->
	<div class="panel panel-default">
		<div class="panel-body">
			<table class="table table-condensed table-hover table-bordered" style="display: table; width: 100%;table-layout:fixed;">
				<thead>
					<tr>
            <th class="col-md-1 text-center" style="width: 15%;vertical-align: middle">购物车编号</th>
            <th class="col-md-1 text-center" style="width: 10%;vertical-align: middle;">订单名称</th>
						<th class="col-md-1 text-center" style="vertical-align: middle">支付金额</th>
						<th class="col-md-1 text-center" style="vertical-align: middle">支付状态</th>
						<th class="col-md-1 text-center" style="vertical-align: middle">支付类型</th>
						<th class="col-md-1 text-center" style="width: 10%;vertical-align: middle">支付成功的类型</th>
            <th class="col-md-1 text-center" style="vertical-align: middle">订单状态</th>
            <th class="col-md-1 text-center" style="vertical-align: middle">出票状态</th>
            <th class="col-md-1 text-center" style="vertical-align: middle">下单人</th>
            <th class="col-md-1 text-center" style="width: 15%;vertical-align: middle">设备号</th>
            <th class="col-md-1 text-center" style="vertical-align: middle">下单时间</th>
            <th class="col-md-1 text-center" style="vertical-align: middle">支付时间</th>
            <th class="col-md-1 text-center" style="vertical-align: middle">操作</th>
					</tr>
				</thead>
				<tbody>
					<tr ng-repeat="obj in objs">
            <td class="text-center" style="vertical-align: middle">{{obj.code}}</td>
            <td class="text-center" style="vertical-align: middle"><div class="ellipsis" style="max-width:100%;display:block;overflow: hidden;white-space: nowrap;-o-text-overflow: ellipsis;text-overflow: ellipsis;" title="{{obj.title}}">{{obj.title}}</div></td>
            <td class="text-center" style="vertical-align: middle">{{obj.pay_fee * 0.01 | currency : '￥'}}</td>
						<td class="text-center" style="vertical-align: middle">{{obj.pay_state}}</td>
            <td class="text-center" style="vertical-align: middle">{{obj.pay_type}}</td>
            <td class="text-center" style="vertical-align: middle">{{obj.pay_fee_type}}</td>
            <td class="text-center" style="vertical-align: middle">{{obj.cancel_state}}</td>
            <td class="text-center" style="vertical-align: middle">{{obj.ticket_state}}</td>
						<td class="text-center" style="vertical-align: middle">{{obj.create_by}}</td>
						<td class="text-center" style="vertical-align: middle">{{obj.device_code}}</td>
						<td class="text-center" style="vertical-align: middle">{{obj.create_time}}</td>
            <td class="text-center" style="vertical-align: middle">{{obj.pay_time}}</td>
            <td class="text-center">
							<a ng-click="cardInfo(obj)" class="btn btn-success btn-xs">详情</a>
						</td>
					</tr>
				</tbody>
			</table>
			<div class="text-right" style="background-color: white">
				<pagination total-items="bigTotalItems" ng-model="bigCurrentPage" max-size="maxSize" class="pagination-sm" boundary-links="true"
				 ng-change="load()" items-per-page="itemsPerPage" previous-text="上一页" next-text="下一页" first-text="首页" last-text="末页" rotate="false">
				</pagination>
			</div>
		</div>
	</div>
</div>
